<div class="special_box">
  <div class="special_box_top"></div>
  <div class="special_box_middle user_box"></div>
  <div class="special_box_bottom"></div>
</div>


<div class="box">
  <div class="box_top"></div>
  <div class="box_middle">
		<% if @user.admin? %>
		  <p>
		    <b>Admin User</b>
		  </p>
		<% end %>
		<p>
			  <b>Login:</b>
			  <%=h @user.login %>
			</p>

			<p>
			  <b>Email:</b>
			  <%=h @user.email %>
			</p>
      
			<p>
			  <b>Timezone:</b> <%=h @user.time_zone.to_s %>
			</p>
			<p>
			  <b>#Deployments:</b> <%=h @user.deployments.count %>
			</p>
			<br/>
			<% if current_user.admin? || current_user == @user %>
			 <%= link_to 'Edit & change password', edit_user_path(@user), :class => 'arrow_link' %> | 
			 <%= link_to 'Delete', user_path(@user), :confirm => 'Are you sure?', :method => :delete, :class => 'arrow_link'  %>
			<% end %>
  </div>
  <div class="box_bottom"></div>
</div>

<div class="clear"></div>
<br>

<fieldset class="fieldset">
  <legend>Recent deployment history</legend>
  <%= render(:partial => 'deployments', :locals => {:user => @user, :deployments => @deployments})%>
</fieldset>


<% content_for(:breadcrumb) do %>
  <% breadcrumb_box do %>
    <%= link_to "Manage users", users_path, :style => "float:right", :class => "arrow_link" %>
    <%= link_to "Users", users_path %> &gt; 
    User <%= link_to @user.login, user_path(@user) %> 
  <% end %>
<% end %>

<% content_for(:page_title) do %>
  <% @page_title = "User #{h(@user.login)}" %>
  <h2>User <%= user_info(@user)%></h2>
<% end %>
